package sctu.edu.java.year2016.team08.lisonghong.day20160521.chapter4_2;

/**
 * 编写java程序，用for 循环实现菱形
 * Created by 松红 on 2016/5/21.
 */
public class chapter4_2 {
    public static void main(String[] args) {
        for (int i = 1; i < 6; i++) {
            if (i == 1 || i == 5)
                System.out.println(" " + " " + "* " + " " + " ");
            if (i == 2 || i == 4)
                System.out.println(" " + "*" + " " + "*" + " ");
            if (i == 3)
                System.out.println("* " + " " + "" + " " + "*");
        }
    }
}